package org.sfx.rich

import java.lang.annotation.Annotation
import java.lang.reflect.AnnotatedElement

case class RichAnnotatedElement(underlying: AnnotatedElement) {
  def annotation[A <: Annotation](annotationClass: Class[A]) = underlying.getAnnotation[A](annotationClass)
  def isAnnotationPresent(annotationClass: Class[_ <: Annotation]) = underlying.isAnnotationPresent(annotationClass)
  def annotations: Array[Annotation] = underlying.getAnnotations()
  def declaredAnnotations: Array[Annotation] = underlying.getDeclaredAnnotations()
}
